package org.fatewa.engine.advice.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.http.HttpStatus;

/**
 * 在处理链路中抛出该异常，可在任意片段实现对 Http Code 的控制
 *
 * @author 4everlynn
 */
@Data
@Accessors(fluent = true, chain = true)
@EqualsAndHashCode(callSuper = true)
public class RayquazaException extends RuntimeException {
    /**
     * Http 返回的状态码
     */
    private HttpStatus status;
    /**
     * Http 返回的 Response
     */
    private String msg;

    public RayquazaException(HttpStatus status, String msg) {
        super(msg);
        this.status = status;
        this.msg = msg;
    }

}
